# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=dr-checker
pkgver=140.ea63c0f
pkgrel=3
pkgdesc='A Soundy Vulnerability Detection Tool for Linux Kernel Drivers.'
groups=('blackarch' 'blackarch-exploitation' 'blackarch-fuzzer')
arch=('any')
url='https://github.com/ucsb-seclab/dr_checker'
license=('BSD')
depends=('python2')
makedepends=('git')
source=("$pkgname::git+https://github.com/ucsb-seclab/dr_checker.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/$pkgname"

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md paper/* docs/*
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

  rm -rf README.md LICENSE paper docs

  cp -a * "$pkgdir/usr/share/$pkgname/"
}

